<?php
header('Content-Type:text/html;Charset=UTF-8');
session_start();
 
@$adminID =$_SESSION['adminID'];

?>
<!DOCTYPE html>
<html>
   <head>
      <title>mini 便捷通讯录</title>
	  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" charset="UTF-8" >
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
      <link href="bootstrap/css/bootstrap-editable.css" rel="stylesheet">
      <script src="bootstrap/js/jquery-1.11.1.min.js"></script>
      <script src="bootstrap/js/bootstrap.min.js"></script>
        <script src="bootstrap/js/bootstrap-editable.js"></script>
      <!--[if lt IE 9]>
        <script src="js/html5shiv.js"></script>
        <script src="js/respond.min.js"></script>
      <![endif]-->
   </head>
   <script>
   	var adminID = '<?php echo $adminID;?>';
   </script>
   <script src="lib/dialog.js"></script>
   <script src="lib/index.js"></script>
   <style>
   <?php if(empty($adminID)){?>
	   #loginBtn{display:inline-block}
	   #logoutBtn,#addBtn{display: none}
    <?php }else{?>
    #loginBtn{display:none}
    #logoutBtn,#addBtn{display:inline-block}
    <?php }?>
   .myDialog{width: 300px;margin:100px auto;height:400px}
   .danger{font-weight:bold;}
   .delspan:hover{color:red;text-decoration:underline;}
   </style>
   <body>
 	<div class="container">
 		<nav class="navbar navbar-default">
 			<div class="row navbar-form text-right">
 				<div class="col-xs-4">
 					<button id="loginBtn" class="btn btn-default" data-toggle="modal" data-target="#loginDialog">我要登陆</button>
 					<button id="logoutBtn" class="btn btn-default" data-toggle="modal" data-target="#logoutDialog">退出登陆</button>
 				</div>
 					<div class="col-xs-4">
 					<form id="searchForm">
	 					<div class="input-group">
	 						<input id="searInput" name="text" class="form-control" placeholder="搜索姓名" />
	 							<div class="input-group-btn">
	 								<button id="searchSubmit" class="btn btn-default"type="button">
	 									<span class="glyphicon glyphicon-search"></span>
	 								</button>
	 							</div>
	 					</div>
 					</form>
 				</div>
 					<div class="col-xs-4">
 					<button id="addBtn" class="btn btn-default" data-toggle="modal" data-target="#addDialog">添加联系人</button>
 					<button id="allBtn" class="btn btn-default">全部联系人</button>
 				</div>
 			</div>
 		</nav>
 		<div class="modal" id="loginDialog">
 			<div class="myDialog">
 				<div class="modal-content">
 					<div class="modal-header">
 						<span class="close" data-dismiss="modal">&times;</span>
 						<h4 class="modal-title">用户登录</h4>
 					</div>
 					<form id="loginForm" class="form-horizontal">
	 					<div class="modal-body">
							<div class="form-group">
								<label class="col-xs-3 hidden-xs control-label" for="loginInput">登录名</label>
								<div class="col-xs-9">
									<div class="input-group">
										<div class="input-group-addon">
											<span class="glyphicon glyphicon-user"></span>
										</div>
									<input id="loginInput" name="login" class="form-control" placeholder="登录名"/>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-xs-3 hidden-xs control-label" for="passwordInput">密　码</label>
								<div class="col-xs-9">
									<div class="input-group">
										<div class="input-group-addon">
											<span class="glyphicon glyphicon-user"></span>
										</div>
									<input id="passwordInput" name="password" class="form-control" type="password" placeholder="密　码"/>
									</div>
								</div>
							</div>
	 					</div>
 					</form>
 					<div class="modal-footer">
 						<button id="loginSubmit" class="btn btn-primary  btn-sm">登录</button>
 						<button class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
 					</div>
 				</div>
 			</div>
 		</div>
 		<div class="modal" id="addDialog">
 			<div class="myDialog">
 				<div class="modal-content"> 
 					<div class="modal-header">
 						<span class="close" data-dismiss="modal">&times;</span>
 						<h4 class="modal-title">添加联系人</h4>
 					</div>
 					<form id="addForm" class="form-horizontal">
	 					<div class="modal-body">
							<div class="form-group">
								<label class="col-xs-3 hidden-xs control-label" for="loginInput">姓名</label>
								<div class="col-xs-9">
									<input id="nameInput" name="name" class="form-control" placeholder="姓名"/>
								</div>
							</div>
							<div class="form-group">
								<label class="col-xs-3 hidden-xs control-label" for="passwordInput">手机</label>
								<div class="col-xs-9">
									<input id="phoneInput" name="phone" class="form-control" placeholder="手机"/>
								</div>
							</div>
							<div class="form-group">
								<label class="col-xs-3 hidden-xs control-label" for="passwordInput">QQ</label>
								<div class="col-xs-9">
									<input id="qqInput" name="qq" class="form-control" placeholder="QQ"/>
								</div>
							</div>
	 					</div>
 					</form>
 					<div class="modal-footer">
 						<button id="addSubmit" class="btn btn-primary  btn-sm">确定</button>
 						<button class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
 					</div>
 				</div>
 			</div>
 		</div>
 		<div class="modal" id="logoutDialog">
 			<div class="myDialog">
 				<div class="modal-content">
 					<div class="modal-header">
 						<span class="close" data-dismiss="modal">&times;</span>
 						<h4 class="modal-title">用户退出登录</h4>
 					</div>
 					<form id="loginForm" class="form-horizontal">
	 					<div class="modal-body">
							你确定退出登录？
	 					</div>
 					</form>
 					<div class="modal-footer">
 						<button id="logoutSubmit" class="btn btn-primary btn-sm">确定</button>
 						<button class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
 					</div>
 				</div>
 			</div>
 		</div>
 		<div class="panel panel-default">
 			<div class="panel-heading">
 				<h4 class="panel=title">联系人列表</h4>
 			</div>
 			<div class="panel-body">
 				<table class="table table-bordered text-center">
 					<tr class="danger">
 						<td>姓名</td>
 						<td>手机</td>
 						<td>Q　Q</td>
 					</tr>
 				</table>
 			</div>
 		</div>
 	</div>
 </body>
      